Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meta/sql: improve MySQL/PostgreSQL meta concurrency #5460

Merged
merged 10 commits into from
Jan 2, 2025

Conversation

anysql
Copy link
Contributor

@anysql anysql commented Dec 27, 2024

1, Optimize the ForUpdate call of doMknod/Link/Unlink/Rmdir/Rename operation
2, Change nlink operation from "Nlink = ?" to "nlink = nlink + (?)" for atomic
3, Move the parent update operation to the end of transaction
4, Remove txLock for MySQL/PostgreSQL meta engine

anysql and others added 2 commits December 27, 2024 17:19
1, Optimize the ForUpdate call of doMknod/Link/Unlink/Rmdir/Rename operation
2, Change nlink operation from "Nlink = ?" to "nlink = nlink + (?)" for atomic
3, Move the parent update operation to the end of transaction
4, Remove txLock for MySQL/PostgreSQL meta engine
@CLAassistant
Copy link

CLAassistant commented Dec 27, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

codecov bot commented Dec 27, 2024

Codecov Report

Attention: Patch coverage is 0% with 60 lines in your changes missing coverage. Please review.

Project coverage is 21.42%. Comparing base (b8eadbc) to head (bafe1cb).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
pkg/meta/sql.go 0.00% 60 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5460       +/-   ##
===========================================
- Coverage   33.33%   21.42%   -11.91%     
===========================================
  Files         165       29      -136     
  Lines       47522    19009    -28513     
===========================================
- Hits        15842     4073    -11769     
+ Misses      29802    14453    -15349     
+ Partials     1878      483     -1395     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@anysql
Copy link
Contributor Author

anysql commented Jan 2, 2025

One question, when use EAGAIN to retry the transaction, some test cases failed. (I already know the root cause, it's due to EAGAIN is widely used in MySQL communication, and the errno is not reset always)

After switch to EBUSY, all test cases passed, still need to evaluate is it ok to use EBUSY here.

@davies davies merged commit 9af103b into main Jan 2, 2025
38 checks passed
@davies davies deleted the perf_sql_engine_lock_optimize branch January 2, 2025 05:54
@jiefenghuang jiefenghuang changed the title perf - Improve MySQL/PostgreSQL meta concurrency meta/sql: improve MySQL/PostgreSQL meta concurrency Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants